In many applications such as Raman and/or fluorescence measurements, confocal measurement possesses advantages since existing flare is strongly suppressed. The problem with confocal measurements or confocal microscopy is, however, that the plane or area to be imaged, especially the surface when scanning a sample, does not remain within the focal plane due to drift, sample unevenness, roughness, and tilt of the sample.